import React from "react";
import { memo } from "react"


const Errors = (props)=>{
    const {errors} = props
     if(errors){
        return(
            <ul className="error-messages">
                <li>
                    {errors.message}
                </li>
            </ul>
        )
    }else{
        return null
    }
}



export default memo(Errors)